package cn.tedu.csmallproducts.preload;

import cn.tedu.csmallproducts.mapper.AlbumMapper;
import cn.tedu.csmallproducts.pojo.vo.AlbumListItemVO;
import cn.tedu.csmallproducts.pojo.vo.AlbumStandardVO;
import cn.tedu.csmallproducts.repo.IAlbumRedisRepository;
import cn.tedu.csmallproducts.service.IAlbumService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import java.util.List;

@Slf4j
@Component
public class CachePreload implements ApplicationRunner {

    @Autowired
    private IAlbumService service;


    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.debug("开始执行");
        service.rebuildCache();
    }
}
